home *** CD-ROM | disk | FTP | other *** search
- Path: Inter.NL.net!usenet
- From: Auke.Reitsma@net.HCC.nl (Auke Reitsma)
- Newsgroups: comp.lang.c
- Subject: Re: Parallel Port help
- Date: Mon, 12 Feb 1996 22:09:48 GMT
- Organization: Inter.NL.net, The Internet Provider in The Netherlands.
- Message-ID: <4foe2g$qm0@altrade.nijmegen.inter.nl.net>
- References: <4fmj1l$mro@ns2.ptd.net>
- Reply-To: Auke.Reitsma@net.HCC.nl
- NNTP-Posting-Host: rt99-18.rotterdam.nl.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- sound@postoffice.ptd.net (jonathan stroh) wrote:
-
- > I need the source code to output to parallel ports.
- > First I would like the code for LPT1 and if possible LPT2 and LPT3
-
- Which OS? If good ol' MS-DOS (and reasonable compiler) just use:
-
- fprintf( stdprn, "This goes to %s\n", "the printer );
-
- or something like that. Any FILE * function can use stdprn as a
- 'file'. 'stdprn defaults to LPT1. To use other printers use:
-
-
- int PrinterRedirect( char * FileOrDevice )
- {
- return (NULL == freopen( FileOrDevice, "wb", stdprn));
- }
-
- with either "LPT2" or "LPT3" as parameter.
- It also works with normal files.
-
-
- Greetings from Delft, The Netherlands.
-
- Auke Reitsma
-
-